function *test(){
    console.log("11111",'第一次无效无值')
    let input1=yield "111-输出";
    console.log("2222",input1)
    let input2=yield "2-输出";
    console.log("1111213",input2)
    let input3=yield "3-输出";
    console.log("1111213",input3)
}

var pengke_test=test()
let res1=pengke_test.next('aaa')//执行一次就往yield下执行一段（第一次传值是无效的）
console.log(res1);
let res2=pengke_test.next('bbb')//通过变量接收yield的值即传的bbb值
console.log(res2);
let res3=pengke_test.next('cccc')
console.log(res3);
let res4=pengke_test.next()
console.log(res4);//当没有yield了就打印done为true，value=undefined

function *test1(){
    setTimeout(() => {
        console.log("拿到数据666");
        pengke_test1.next();
    }, 2000);
    yield;
    setTimeout(() => {
        console.log("拿到数据66123");
        pengke_test1.next();
    }, 2000);
    yield;
    setTimeout(() => {
        console.log("拿到数据6222222222266");
    }, 2000);
    yield;
}
let pengke_test1=test1();

pengke_test1.next();